package cn.lzx.orderBlockHander;

import cn.lzx.domain.User;
import cn.lzx.feign.UserService;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

@Component
public class OrderFallbackClass {
    // 必须要有Throwable
    public User getByIdFallback(@PathVariable("id") Long id, Throwable throwable) {
        return new User(-2L,"降级了","服务器繁忙");
    }

}
